<template>
  <view class="index tn-safe-area-inset-bottom">
    <view class="tn-padding-bottom-sm" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
      <view class="tn-flex tn-flex-row-between" @click="tn('')">
        <view class="justify-content-item tn-margin tn-text-bold tn-text-xxl">
          货物管理
        </view>
        <view class="justify-content-item tn-margin tn-text-lg tn-color-cat">
          <text class="tn-padding-xs">1</text>
          <text class="tn-icon-topics"></text>
        </view>
      </view>
    </view>
<!-- 方式12 start-->
   <view class="about-shadow tn-padding-bottom-sm tn-bg-bulue">
        <view class="tn-flex tn-flex-row-between">
          <view class="tn-padding-sm tn-margin-xs" @click="tn('/goods/goods')">
            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
                <view class="tn-icon-cube tn-color-blue"></view>
              </view>
              <view class="tn-text-center">
                <text class="tn-text-ellipsis">货物信息</text>
              </view>
            </view>
          </view>
        </view>
      </view>
<!-- 	  <view class="tn-padding-bottom-sm">
	        <view class="tn-flex tn-flex-row-between" @click="tn('')">
	          <view class="justify-content-item tn-margin tn-text-bold tn-text-xxl">
	            客户管理
	          </view>
	          <view class="justify-content-item tn-margin tn-text-lg tn-color-cat">
	            <text class="tn-padding-xs">1</text>
	            <text class="tn-icon-topics"></text>
	          </view>
	        </view>
	      </view> -->
	  <!-- 方式12 start-->
<!-- 	     <view class="about-shadow tn-padding-bottom-sm tn-bg-bulue">
	          <view class="tn-flex tn-flex-row-left">
	            <view class="tn-padding-sm tn-margin-xs" @click="tn('/customer/list')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-cube tn-color-blue"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">客户信息</text>
	                </view>
	              </view>
	            </view>
				<view class="tn-padding-sm tn-margin-xs" @click="tn('/customer/person')">
				  <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
				    <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
				      <view class="tn-icon-cube tn-color-blue"></view>
				    </view>
				    <view class="tn-text-center">
				      <text class="tn-text-ellipsis">联系人</text>
				    </view>
				  </view>
				</view>
	          </view>
	        </view> -->
<!-- 	  <view class="tn-padding-bottom-sm">
	    <view class="tn-flex tn-flex-row-between" @click="tn('')">
	      <view class="justify-content-item tn-margin tn-text-bold tn-text-xxl">
	        仓库管理
	      </view>
	      <view class="justify-content-item tn-margin tn-text-lg tn-color-cat">
	        <text class="tn-padding-xs">1</text>
	        <text class="tn-icon-topics"></text>
	      </view>
	    </view>
	  </view> -->
	  <!-- 方式12 start-->
	     <!-- <view class="about-shadow tn-padding-bottom-sm tn-bg-bulue">
	          <view class="tn-flex tn-flex-row-between">
	            <view class="tn-padding-sm tn-margin-xs" @click="tn('/depot/depot')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-cube tn-color-blue"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">仓库信息</text>
	                </view>
	              </view>
	            </view>
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/depot/inStoreList')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-signpost tn-color-blue"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">入库</text>
	                </view>
	              </view>
	            </view>
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-refund tn-color-blue"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">出库</text>
	                </view>
	              </view>
	            </view>
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/messagePages/chat')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-constellation tn-color-blue"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">调库</text>
	                </view>
	              </view>
	            </view>
	          </view>
	          <view class="tn-flex tn-flex-row-between tn-radius tn-padding-top">
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/discoveryPages/order')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-order tn-color-cat"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">实时库存</text>
	                </view>
	              </view>
	            </view>
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/minePages/integral')">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-calendar tn-color-cat"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">盘点</text>
	                </view>
	              </view>
	            </view>
	            <view class="tn-padding-sm tn-margin-xs tn-radius" @click="navAddress">
	              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
	                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
	                  <view class="tn-icon-map tn-color-cat"></view>
	                </view>
	                <view class="tn-text-center">
	                  <text class="tn-text-ellipsis">分析</text>
	                </view>
	              </view>
	            </view>
	          </view>
	        </view> -->
			
			<view class="tn-padding-bottom-sm">
			  <view class="tn-flex tn-flex-row-between" @click="tn('')">
			    <view class="justify-content-item tn-margin tn-text-bold tn-text-xxl">
			      信贷融资
			    </view>
			    <view class="justify-content-item tn-margin tn-text-lg tn-color-cat">
			      <text class="tn-padding-xs">1</text>
			      <text class="tn-icon-topics"></text>
			    </view>
			  </view>
			</view>
			<!-- 方式12 start-->
			   <view class="about-shadow tn-padding-bottom-sm tn-bg-bulue">
			        <view class="tn-flex tn-flex-row-between">
			          <view class="tn-padding-sm tn-margin-xs" @click="apply()">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-cube tn-color-blue"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">贷款申请</text>
			              </view>
			            </view>
			          </view>
			          <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/pages/loan/loan_order')">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-signpost tn-color-blue"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">贷款查询</text>
			              </view>
			            </view>
			          </view>
			          <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/pages/loan/loan_process')">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-refund tn-color-blue"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">进度查询</text>
			              </view>
			            </view>
			          </view>
			          <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/money/money')">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-constellation tn-color-blue"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">额度管理</text>
			              </view>
			            </view>
			          </view>
			        </view>
		        <view class="tn-flex tn-flex-row-between tn-radius tn-padding-top">
<!-- 			          <view class="tn-padding-sm tn-margin-xs tn-radius">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-order tn-color-cat"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">还款</text>
			              </view>
			            </view>
			          </view> -->
		<!-- 	          <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/pages/loan/repayment_detail')">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-calendar tn-color-cat"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">还款明细</text>
			              </view>
			            </view>
			          </view> -->
			          <view class="tn-padding-sm tn-margin-xs tn-radius" @click="tn('/pages/loan/loan_contract')">
			            <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
			              <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
			                <view class="tn-icon-map tn-color-cat tn-color-blue"></view>
			              </view>
			              <view class="tn-text-center">
			                <text class="tn-text-ellipsis">贷款合同</text>
			              </view>
			            </view>
			          </view>
			        </view>
			      </view>
				  
<!-- 				  <view class="tn-padding-bottom-sm">
				        <view class="tn-flex tn-flex-row-between" @click="tn('')">
				          <view class="justify-content-item tn-margin tn-text-bold tn-text-xxl">
				            流程审批
				          </view>
				          <view class="justify-content-item tn-margin tn-text-lg tn-color-cat">
				            <text class="tn-padding-xs">1</text>
				            <text class="tn-icon-topics"></text>
				          </view>
				        </view>
				      </view> -->
				  <!-- 方式12 start-->
				     <!-- <view class="about-shadow tn-padding-bottom-sm tn-bg-bulue">
				          <view class="tn-flex tn-flex-row-between">
				            <view class="tn-padding-sm tn-margin-xs" @click="tn('')">
				              <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
				                <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
				                  <view class="tn-icon-cube tn-color-blue"></view>
				                </view>
				                <view class="tn-text-center">
				                  <text class="tn-text-ellipsis">提交审批</text>
				                </view>
				              </view>
				            </view>
							<view class="tn-padding-sm tn-margin-xs" @click="tn('/approvalPages/loan_amount')">
							  <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
							    <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
							      <view class="tn-icon-cube tn-color-blue"></view>
							    </view>
							    <view class="tn-text-center">
							      <text class="tn-text-ellipsis">贷款额度审批</text>
							    </view>
							  </view>
							</view>
							<view class="tn-padding-sm tn-margin-xs" @click="tn('/approvalPages/index')">
							  <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
							    <view class="icon12__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-grey--light">
							      <view class="tn-icon-cube tn-color-blue"></view>
							    </view>
							    <view class="tn-text-center">
							      <text class="tn-text-ellipsis">贷款合同审批</text>
							    </view>
							  </view>
							</view>
				          </view>
				        </view> -->
    <view class='tn-tabbar-height'></view>
   
  </view>
</template>

<script>
  import {getUserStatus} from '@/api/auth.js'
  export default {
    name: 'Work',
    data(){
      return {
      }
    },
    created() {
    },
    methods: {
	  apply(){
		  getUserStatus().then(res=>{
			  if(res.realName==false){
				  this.$t.message.toast('请先实名认证')
			  }else if(res.realEnterprise==false){
				  this.$t.message.toast('请先认证公司')
			  }else if(res.haveAmount==false){
				  this.$t.message.toast('请先评估贷款额度')
			  }else{
				 this.tn('/pages/loan/apply') 
			  }
		  })
	  },
      // 跳转
      tn(e) {
      	uni.navigateTo({
      		url: e,
      	});
      },
    }
  }
</script>

<style lang="scss" scoped>
  .index{
    max-height: 100vh;
  }
  /* 底部安全边距 start*/
  .tn-tabbar-height {
  	min-height: 120rpx;
  	height: calc(140rpx + env(safe-area-inset-bottom) / 2);
    height: calc(140rpx + constant(safe-area-inset-bottom));
  }

  /* 轮播视觉差 start */
  .card-swiper {
    height: 430rpx !important;
  }
    
  .card-swiper swiper-item {
    width: 750rpx !important;
    left: 0rpx;
    box-sizing: border-box;
    padding: 40rpx 30rpx 30rpx 30rpx;
    overflow: initial;
  }
    
  .card-swiper swiper-item .swiper-item {
    width: 100%;
    display: block;
    height: 100%;
    border-radius: 15rpx;
    transform: scale(1);
    transition: all 0.2s ease-in 0s;
    // overflow: hidden;
  }
    
  .card-swiper swiper-item.cur .swiper-item {
    transform: none;
    transition: all 0.2s ease-in 0s;
  }
    
  .card-swiper swiper-item .swiper-item-text {
    margin-top: -160rpx;
    text-align: center;
    width: 100%;
    display: block;
    height: 50%;
    border-radius: 10rpx;
    transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
    transition: all 0.6s ease 0s;
    overflow: hidden;
  }
    
  .card-swiper swiper-item.cur .swiper-item-text {
    margin-top: -220rpx;
    width: 100%;
    transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
    transition: all 0.6s ease 0s;
  }
  
  .image-banner{
    border: 1rpx solid #F8F7F8;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .image-banner image{
    width: 100%;
    height: 100%;
  }
  
  /* 轮播指示点 start*/
  .indication{
    z-index: 9999;
    width: 100%;
    height: 36rpx;
    position: absolute;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
  }
  
  .spot{
    background-color: #FFFFFF;
    opacity: 0.6;
    width: 10rpx;
    height: 10rpx;
    border-radius: 20rpx;
    top: -70rpx;
    margin: 0 8rpx !important;
    position: relative;
  }
  
  .spot.active{
    opacity: 1;
    width: 30rpx;
    background-color: #FFFFFF;
  }
  

  
 /* 图标容器12 start */
 .tn-three{
     position: absolute;
     top: 50%;
     right: 50%;
     bottom: 50%;
     left: 50%;
     transform: translate(-38rpx, -20rpx) rotateX(20deg) rotateY(10deg) rotateZ(-20deg);
     text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
 }
 .icon12 {
   &__item {
     width: 30%;
     background-color: #FFFFFF;
     border-radius: 10rpx;
     padding: 30rpx;
     margin: 20rpx 10rpx;
     transform: scale(1);
     transition: transform 0.3s linear;
     transform-origin: center center;
     
     &--icon {
       width: 100rpx;
       height: 100rpx;
       font-size: 60rpx;
       border-radius: 50%;
       margin-bottom: 18rpx;
       position: relative;
       z-index: 1;
       
       &::after {
         content: " ";
         position: absolute;
         z-index: -1;
         width: 100%;
         height: 100%;
         left: 0;
         bottom: 0;
         border-radius: inherit;
         opacity: 1;
         transform: scale(1, 1);
         background-size: 100% 100%;
         background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
 
           
       }
     }
   }
 }
  
  /* 自定义导航栏内容 start */
  .custom-nav {
    height: 100%;
    
    &__back {
      margin: auto 5rpx;
      font-size: 40rpx;
      margin-right: 10rpx;
      margin-left: 30rpx;
      flex-basis: 5%;
    }
    
    &__search {
      flex-basis: 60%;
      width: 100%;
      height: 100%;
      
      &__box {
        width: 100%;
        height: 70%;
        padding: 10rpx 0;
        margin: 0 30rpx;
        border-radius: 60rpx 60rpx 0 60rpx;
        font-size: 24rpx;
      }
      
      &__icon {
        padding-right: 10rpx;
        margin-left: 20rpx;
        font-size: 30rpx;
      }
      
      &__text {
        // color: #AAAAAA;
      }
    }
  }
  .logo-image{
    width: 65rpx;
    height: 65rpx;
    position: relative;
    border: 1rpx solid #F8F7F8;
    border-radius: 50%;
  }
  .logo-pic{
    background-size: cover;
    background-repeat:no-repeat;
    // background-attachment:fixed;
    background-position:top;
    border-radius: 50%;
  }
  /* 自定义导航栏内容 end */
  

  /* 热门图片 start*/
  .image-tuniao1{
    padding: 165rpx 0rpx;
    font-size: 40rpx;
    font-weight: 300;
    position: relative;
  }
  .image-tuniao2{
    padding: 75rpx 0rpx;
    font-size: 40rpx;
    font-weight: 300;
    position: relative;
  }
  .image-tuniao3{
    padding: 90rpx 0rpx;
    font-size: 40rpx;
    font-weight: 300;
    position: relative;
  }
  .image-pic{
    border: 1rpx solid #F8F7F8;
    background-size: cover;
    background-repeat:no-repeat;
    // background-attachment:fixed;
    background-position:top;
    border-radius: 10rpx;
  }

  /* 文章内容 start*/
  .tn-blogger-content {
    &__wrap {
      margin: 30rpx;
    }
    
    &__info {
      &__btn {
        margin-right: -12rpx;
        opacity: 0.5;
      }
    }
    
    &__label {
      &__item {
        color: #1D2541;
        background-color: #F3F2F7;
        border-radius: 10rpx;
        font-size: 22rpx;
        
        padding: 5rpx 15rpx;
        margin: 5rpx 0 0 18rpx;
        
        &--prefix {
          font-size: 24rpx;
          color: #1D2541;
          padding-right: 10rpx;
        }
      }
      
      &__desc {
        line-height: 55rpx;
      }
    }
    
    &__main-image {
      border: 1rpx solid #F8F7F8;
      border-radius: 16rpx;
      
      &--1 {
        max-width: 690rpx;
        min-width: 690rpx;
        max-height: 400rpx;
        min-height: 400rpx;
      }
      
      &--2 {
        max-width: 260rpx;
        max-height: 260rpx;
      }
      
      &--3 {
        height: 212rpx;
        width: 100%;
      }
    }
    
    &__count-icon {
      font-size: 40rpx;
      padding-right: 5rpx;
    }
  }
  
  .image-wallpaper{
    padding: 160rpx 0rpx;
    font-size: 40rpx;
    font-weight: 300;
    position: relative;
  }
  .image-pic{
    background-size: cover;
    background-repeat:no-repeat;
    // background-attachment:fixed;
    background-position:top;
    border-radius: 10rpx;
  }
  /* 文章内容 end*/
  
</style>